import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

public class Menu extends World
{
    B1 b1;
    B2 b2;
    B3 b3;
    B4 b4;
    private int distance;

    /**
     * Menu Constructor.
     */
    public Menu( int dist)
    {    
        super(600, 500, 1); 
        b1 = new B1();
        b2 = new B2();
        b3 = new B3();
        b4 = new B4();
        addObject( b1, 172, 120);
        addObject( b2, 477, 120);
        addObject( b3, 200, 375);
        addObject( b4, 505, 380);
        distance = dist;
        prepare();
    }

    /**
     * Have the control of the scenarios.
     */
    public void act()
    {
        if( Greenfoot.mousePressed( b1) == true)
            Greenfoot.setWorld(new Sky() );
        if( Greenfoot.mousePressed( b2) == true)
            Greenfoot.setWorld(new Records( distance) );
        if( Greenfoot.mousePressed( b3) == true)
            Greenfoot.setWorld(new Ayuda() );
        if(  Greenfoot.mousePressed( b4) == true)
            Greenfoot.setWorld(new Creditos() );
    }

    private void prepare()
    {
    }
}